home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / inco < prev    next >
Internet Message Format  |  1995-03-31  |  4KB

  1. From helens!shelby!rutgers!apple!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!mephisto!prism!gt3398b Tue May 15 16:33:56 PDT 1990
  2. Status: RO
  3.  
  4. Article 1635 of comp.sys.handhelds:
  5. Path: helens!shelby!rutgers!apple!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!mephisto!prism!gt3398b
  6. >From: gt3398b@prism.gatech.EDU (DELANO,ANDREW DOUGLAS)
  7. Newsgroups: comp.sys.handhelds
  8. Subject: INCO ON THE 48sx
  9. Message-ID: <9331@hydra.gatech.EDU>
  10. Date: 15 May 90 19:24:25 GMT
  11. Organization: Georgia Institute of Technology
  12. Lines: 161
  13.  
  14.  
  15.  
  16. I just finished converting the game INCO to work on the 48sx.  It is a
  17. simple little game, but it does'nt take up much memory, and I like it.
  18. I got the 28s copy from the ftp site funic.funet.fi.  I had to add one
  19. program of my own (K->STR) and make a few minor changes.  It works great
  20. on the 48 and is in ready to download form.  NOTE!!: Joachim Isaksson
  21. wrote this program for the 28s, and all credit for it should go to him.
  22. All I have done is convert it to work on the 48sx.  I have included 
  23. Joachim's original instructions followed by the program in ready to
  24. download form.  My thanks to Joachim for creating this fun little
  25. game that helps me get through some of my boring classes.
  26.  
  27.                                Andy Delano
  28. ________________________________________________________________________________  
  29. I have just finished a little game for the HP28, but as I have no write access
  30. to the comp.sys.handhelds I thought I'd send it to somebody who can check it
  31. out and 'News' it if it's any good. Feel free to make a better version, as this
  32. one is no 'masterpiece'. 
  33.  
  34.                         Joachim Isaksson
  35.                           (d89-jin@sm.luth.se)
  36.  
  37. Instructions and program following...
  38.  
  39. -------------------------------------------------------------------------------
  40.  
  41. The game of 'INCO'
  42.  
  43. This is a game based on a 'simple' idea. When you enter a number and press the
  44. 'INCO' button the HP28 will start with a 3 by 3 array containing only nines,
  45. mixing it the number of times you entered by picking a row and a column in
  46. which it will decrease all numbers by one. It will then display the resulting
  47. array and your objective is to get the array containing only nines back by
  48. pressing a digit, thereby increasing all numbers in the row/column you picked.
  49. (Hard to explain, but you'll soon pick up the idea)
  50. It isn't very well programmed, but I haven't had my HP28 for more than 3 weeks
  51. so I hope I am excused. If anyone makes a better version, please post it to me
  52. or even better to the net.
  53.  
  54.  
  55. %%HP: T(3)A(D)F(.);
  56. DIR
  57.   INCO
  58.     \<< \-> dif
  59.       \<< CLLCD { 3 3
  60. } 9 CON 1 dif
  61.         FOR j RAND
  62. 9 * 1 + IP \->ARR -
  63.         NEXT \->ADJ 0
  64. SWAP
  65.         DO SWAP 1 +
  66. SWAP DUP \->DSP 0
  67.           DO DROP
  68.             DO
  69.             UNTIL
  70. KEY
  71.             END
  72.           UNTIL
  73. K\->STR DUP DUP "1" \>=
  74. SWAP "9" \<= AND
  75.           END STR\->
  76. \->ARR + \->ADJ 100 .01
  77. BEEP
  78.         UNTIL DUP {
  79. 3 3 } 9 CON SAME
  80.         END \->DSP
  81. 10000 .01 BEEP \->STR
  82. "   Well done "
  83. SWAP + " Moves" + 4
  84. DISP 0 FREEZE
  85.       \>>
  86.     \>>
  87.   \->DSP
  88.     \<< \->STR
  89. "         " \-> arr
  90. spc
  91.       \<< spc arr 4 8
  92. SUB + 1 DISP spc
  93. arr 15 19 SUB + 2
  94. DISP spc arr 26 30
  95. SUB + 3 DISP "" 4
  96. DISP
  97.       \>>
  98.     \>>
  99.   \->ARR
  100.     \<< DUP 1 - 3 MOD
  101. 1 + SWAP 9 SWAP - 3
  102. / 1 + IP \-> y x
  103.       \<< { 3 3 } 0
  104. CON 1 3
  105.         FOR j { x j
  106. } 1 PUT { j y } 1
  107. PUT
  108.         NEXT
  109.       \>>
  110.     \>>
  111.   \->ADJ
  112.     \<< ARRY\-> DROP 1
  113. 9
  114.       FOR j 9 ROLL
  115. 10 MOD
  116.       NEXT { 3 3 }
  117. \->ARRY
  118.     \>>
  119.   K\->STR
  120.     \<<
  121.       CASE
  122.         IF DUP 82
  123. ==
  124.         THEN DROP
  125. "1"
  126.         END
  127.         IF DUP 83
  128. ==
  129.         THEN DROP
  130. "2"
  131.         END
  132.         IF DUP 84
  133. ==
  134.         THEN DROP
  135. "3"
  136.         END
  137.         IF DUP 72
  138. ==
  139.         THEN DROP
  140. "4"
  141.         END
  142.         IF DUP 73
  143. ==
  144.         THEN DROP
  145. "5"
  146.         END
  147.         IF DUP 74
  148. ==
  149.         THEN DROP
  150. "6"
  151.         END
  152.         IF DUP 62
  153. ==
  154.         THEN DROP
  155. "7"
  156.         END
  157.         IF DUP 63
  158. ==
  159.         THEN DROP
  160. "8"
  161.         END
  162.         IF DUP 64
  163. ==
  164.         THEN DROP
  165. "9"
  166.         END
  167.       END
  168.     \>>
  169. END
  170. -- 
  171. DELANO,ANDREW DOUGLAS
  172. Georgia Institute of Technology, Atlanta Georgia, 30332
  173. uucp:      ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt3398b
  174. Internet: gt3398b@prism.gatech.edu
  175.  
  176.  
  177.